<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
    <title>FcSDK</title>
    <link href="../../../images/logo-icon.svg" rel="icon" type="image/svg">
    <script>var pathToRoot = "../../../";</script>
    <script>const storage = localStorage.getItem("dokka-dark-mode")
    if (storage == null) {
        const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
        if (osDarkSchemePreferred === true) {
            document.getElementsByTagName("html")[0].classList.add("theme-dark")
        }
    } else {
        const savedDarkMode = JSON.parse(storage)
        if(savedDarkMode === true) {
            document.getElementsByTagName("html")[0].classList.add("theme-dark")
        }
    }
    </script>
<script type="text/javascript" src="../../../scripts/sourceset_dependencies.js" async="async"></script>
<link href="../../../styles/style.css" rel="Stylesheet">
<link href="../../../styles/jetbrains-mono.css" rel="Stylesheet">
<link href="../../../styles/main.css" rel="Stylesheet">
<link href="../../../styles/prism.css" rel="Stylesheet">
<link href="../../../styles/logo-styles.css" rel="Stylesheet">
<script type="text/javascript" src="../../../scripts/clipboard.js" async="async"></script>
<script type="text/javascript" src="../../../scripts/navigation-loader.js" async="async"></script>
<script type="text/javascript" src="../../../scripts/platform-content-handler.js" async="async"></script>
<script type="text/javascript" src="../../../scripts/main.js" defer="defer"></script>
<script type="text/javascript" src="../../../scripts/prism.js" async="async"></script>
<script type="text/javascript" src="../../../scripts/symbol-parameters-wrapper_deferred.js" defer="defer"></script>
</head>
<body>
<div class="navigation-wrapper" id="navigation-wrapper">
    <div id="leftToggler"><span class="icon-toggler"></span></div>
    <div class="library-name">
            <a href="../../../index.html">
                    <span>libraryProtocol2</span>
            </a>
    </div>
    <div>
    </div>
    <div class="pull-right d-flex">
        <div class="filter-section" id="filter-section">
                <button class="platform-tag platform-selector jvm-like" data-active="" data-filter=":libraryProtocol2:dokkaHtml/release">androidJvm</button>
        </div>
        <button id="theme-toggle-button"><span id="theme-toggle"></span></button>
        <div id="searchBar"></div>
    </div>
</div>
<div id="container">
    <div id="leftColumn">
        <div id="sideMenu"></div>
    </div>
    <div id="main">
<div class="main-content" data-page-type="classlike" id="content" pageIds="libraryProtocol2::com.topstep.fitcloud.sdk.v2/FcSDK///PointingToDeclaration//-2029165615">
  <div class="breadcrumbs"><a href="../../../index.html">libraryProtocol2</a><span class="delimiter">/</span><a href="../index.html">com.topstep.fitcloud.sdk.v2</a><span class="delimiter">/</span><span class="current">FcSDK</span></div>
  <div class="cover ">
    <h1 class="cover"><span>Fc</span><wbr></wbr><span><span>SDK</span></span></h1>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":libraryProtocol2:dokkaHtml/release"><div class="symbol monospace"><span class="token keyword">class </span><a href="index.html">FcSDK</a></div><p class="paragraph">The <code class="lang-kotlin">FitCloudSDK</code> Entry Class.</p><p class="paragraph">You need to perform the following configuration for init:</p><p class="paragraph"><strong>1.Configure log</strong></p><p class="paragraph">The <code class="lang-kotlin">FitCloudSDK</code> use <span data-unresolved-link="timber.log/Timber///PointingToDeclaration/">Timber</span> to output log, so you need to configure it. And the BLE function is based on <code class="lang-kotlin">RxAndroidBLE</code>, you can use <span data-unresolved-link="com.polidea.rxandroidble3/RxBleClient/updateLogOptions/#com.polidea.rxandroidble3.LogOptions/PointingToDeclaration/">RxBleClient.updateLogOptions</span> to customize log output.</p><p class="paragraph"><strong>2.Use </strong><a href="-builder/index.html"><strong>FcSDK.Builder</strong></a><strong> to create a </strong><a href="index.html"><strong>FcSDK</strong></a><strong> instance</strong></p><p class="paragraph">Singleton pattern is recommended</p><p class="paragraph"><strong>3.Handle App UI Process state and use </strong><a href="is-foreground.html"><strong>FcSDK.isForeground</strong></a><strong> to set</strong></p><p class="paragraph">Such as:</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">ProcessLifecycleOwner.get().lifecycle.addObserver(object : DefaultLifecycleObserver {<br>  override fun onStart(owner: LifecycleOwner) {<br>      fcSDK.isForeground = true<br>  }<br><br>  override fun onStop(owner: LifecycleOwner) {<br>      fcSDK.isForeground = false<br>  }<br>})</code></pre><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><p class="paragraph"><strong>4.Set </strong><span data-unresolved-link="io.reactivex.rxjava3.plugins/RxJavaPlugins/setErrorHandler/#io.reactivex.rxjava3.functions.Consumer[kotlin.Throwable]/PointingToDeclaration/"><strong>RxJavaPlugins.setErrorHandler</strong></span><strong> to ignore some undeliverable exception</strong></p><p class="paragraph">It is recommended to ignore exceptions in <a href="-companion/rx-java-plugins-ignore-exceptions.html">FcSDK.rxJavaPluginsIgnoreExceptions</a></p><p class="paragraph"><strong>5.Make sure </strong><a href="connector.html"><strong>FcSDK.connector</strong></a><strong> create in main thread</strong></p><br><p class="paragraph">After init, you can use <a href="scanner.html">FcSDK.scanner</a> to scan device. And use <a href="connector.html">FcSDK.connector</a> to connect and control device.</p></div></div>
  </div>
  <div class="tabbedcontent">
    <div class="tabs-section" tabs-section="tabs-section"><button class="section-tab" data-active="" data-togglable="CONSTRUCTOR,TYPE,FUNCTION,PROPERTY">Members</button></div>
    <div class="tabs-section-body">
      <div data-togglable="TYPE">
        <h2 class="">Types</h2>
        <div class="table"><a data-name="237507670%2FClasslikes%2F-2029165615" anchor-label="Builder" id="237507670%2FClasslikes%2F-2029165615" data-filterable-set=":libraryProtocol2:dokkaHtml/release"></a>
          <div class="table-row" data-filterable-current=":libraryProtocol2:dokkaHtml/release" data-filterable-set=":libraryProtocol2:dokkaHtml/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="-builder/index.html"><span><span>Builder</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="237507670%2FClasslikes%2F-2029165615"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":libraryProtocol2:dokkaHtml/release"><div class="symbol monospace"><span class="token keyword">class </span><a href="-builder/index.html">Builder</a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">application<span class="token operator">: </span><span data-unresolved-link="android.app/Application///PointingToDeclaration/">Application</span></span></span><span class="token punctuation">)</span></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="1411275269%2FClasslikes%2F-2029165615" anchor-label="Companion" id="1411275269%2FClasslikes%2F-2029165615" data-filterable-set=":libraryProtocol2:dokkaHtml/release"></a>
          <div class="table-row" data-filterable-current=":libraryProtocol2:dokkaHtml/release" data-filterable-set=":libraryProtocol2:dokkaHtml/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="-companion/index.html"><span><span>Companion</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1411275269%2FClasslikes%2F-2029165615"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":libraryProtocol2:dokkaHtml/release"><div class="symbol monospace"><span class="token keyword">object </span><a href="-companion/index.html">Companion</a></div></div></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div data-togglable="FUNCTION">
        <h2 class="">Functions</h2>
        <div class="table"><a data-name="-2017077664%2FFunctions%2F-2029165615" anchor-label="isAdapterEnabled" id="-2017077664%2FFunctions%2F-2029165615" data-filterable-set=":libraryProtocol2:dokkaHtml/release"></a>
          <div class="table-row" data-filterable-current=":libraryProtocol2:dokkaHtml/release" data-filterable-set=":libraryProtocol2:dokkaHtml/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="is-adapter-enabled.html"><span>is</span><wbr></wbr><span>Adapter</span><wbr></wbr><span><span>Enabled</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-2017077664%2FFunctions%2F-2029165615"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":libraryProtocol2:dokkaHtml/release"><div class="symbol monospace"><span class="token keyword"></span><span class="token keyword">fun </span><a href="is-adapter-enabled.html"><span class="token function">isAdapterEnabled</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">: </span><span data-unresolved-link="kotlin/Boolean///PointingToDeclaration/">Boolean</span></div><div class="brief "><p class="paragraph">Check is bluetooth adapter enabled</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="270345204%2FFunctions%2F-2029165615" anchor-label="observerAdapterEnabled" id="270345204%2FFunctions%2F-2029165615" data-filterable-set=":libraryProtocol2:dokkaHtml/release"></a>
          <div class="table-row" data-filterable-current=":libraryProtocol2:dokkaHtml/release" data-filterable-set=":libraryProtocol2:dokkaHtml/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="observer-adapter-enabled.html"><span>observer</span><wbr></wbr><span>Adapter</span><wbr></wbr><span><span>Enabled</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="270345204%2FFunctions%2F-2029165615"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":libraryProtocol2:dokkaHtml/release"><div class="symbol monospace"><span class="token keyword"></span><span class="token keyword">fun </span><a href="observer-adapter-enabled.html"><span class="token function">observerAdapterEnabled</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">: </span><span data-unresolved-link="io.reactivex.rxjava3.core/Observable///PointingToDeclaration/">Observable</span><span class="token operator">&lt;</span><span class="token keyword"></span><span data-unresolved-link="kotlin/Boolean///PointingToDeclaration/">Boolean</span><span class="token operator">&gt;</span></div><div class="brief "><p class="paragraph">Observer adapter enabled/disabled state</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="1136708126%2FFunctions%2F-2029165615" anchor-label="setReConnectFrequent" id="1136708126%2FFunctions%2F-2029165615" data-filterable-set=":libraryProtocol2:dokkaHtml/release"></a>
          <div class="table-row" data-filterable-current=":libraryProtocol2:dokkaHtml/release" data-filterable-set=":libraryProtocol2:dokkaHtml/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="set-re-connect-frequent.html"><span>set</span><wbr></wbr><span>Re</span><wbr></wbr><span>Connect</span><wbr></wbr><span><span>Frequent</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1136708126%2FFunctions%2F-2029165615"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":libraryProtocol2:dokkaHtml/release"><div class="symbol monospace"><span class="token keyword"></span><span class="token keyword">fun </span><a href="set-re-connect-frequent.html"><span class="token function">setReConnectFrequent</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">isEnabled<span class="token operator">: </span><span data-unresolved-link="kotlin/Boolean///PointingToDeclaration/">Boolean</span></span></span><span class="token punctuation">)</span></div><div class="brief "><p class="paragraph">Whether to always maintain high frequency reconnection.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div data-togglable="PROPERTY">
        <h2 class="">Properties</h2>
        <div class="table"><a data-name="-1981803247%2FProperties%2F-2029165615" anchor-label="connector" id="-1981803247%2FProperties%2F-2029165615" data-filterable-set=":libraryProtocol2:dokkaHtml/release"></a>
          <div class="table-row" data-filterable-current=":libraryProtocol2:dokkaHtml/release" data-filterable-set=":libraryProtocol2:dokkaHtml/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="connector.html"><span><span>connector</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1981803247%2FProperties%2F-2029165615"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":libraryProtocol2:dokkaHtml/release"><div class="symbol monospace"><span class="token keyword"></span><span class="token keyword">val </span><a href="connector.html">connector</a><span class="token operator">: </span><a href="../-fc-connector/index.html">FcConnector</a></div><div class="brief "><p class="paragraph">Get connector for connect and control <code class="lang-kotlin">FitCloud</code> devices</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="-698571345%2FProperties%2F-2029165615" anchor-label="isForeground" id="-698571345%2FProperties%2F-2029165615" data-filterable-set=":libraryProtocol2:dokkaHtml/release"></a>
          <div class="table-row" data-filterable-current=":libraryProtocol2:dokkaHtml/release" data-filterable-set=":libraryProtocol2:dokkaHtml/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="is-foreground.html"><span>is</span><wbr></wbr><span><span>Foreground</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-698571345%2FProperties%2F-2029165615"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":libraryProtocol2:dokkaHtml/release"><div class="symbol monospace"><span class="token keyword"></span><span class="token keyword">var </span><a href="is-foreground.html">isForeground</a><span class="token operator">: </span><span data-unresolved-link="kotlin/Boolean///PointingToDeclaration/">Boolean</span></div><div class="brief "><p class="paragraph">Foreground/background status of the UI process. You must handle it correctly in your app.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="1007332126%2FProperties%2F-2029165615" anchor-label="rxBleClient" id="1007332126%2FProperties%2F-2029165615" data-filterable-set=":libraryProtocol2:dokkaHtml/release"></a>
          <div class="table-row" data-filterable-current=":libraryProtocol2:dokkaHtml/release" data-filterable-set=":libraryProtocol2:dokkaHtml/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="rx-ble-client.html"><span>rx</span><wbr></wbr><span>Ble</span><wbr></wbr><span><span>Client</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1007332126%2FProperties%2F-2029165615"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":libraryProtocol2:dokkaHtml/release"><div class="symbol monospace"><span class="token keyword"></span><span class="token keyword">val </span><a href="rx-ble-client.html">rxBleClient</a><span class="token operator">: </span><span data-unresolved-link="com.polidea.rxandroidble3/RxBleClient///PointingToDeclaration/">RxBleClient</span></div><div class="brief "><p class="paragraph">Get <span data-unresolved-link="com.polidea.rxandroidble3/RxBleClient///PointingToDeclaration/">RxBleClient</span> of <code class="lang-kotlin">RxAndroidBLE</code></p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="170916032%2FProperties%2F-2029165615" anchor-label="scanner" id="170916032%2FProperties%2F-2029165615" data-filterable-set=":libraryProtocol2:dokkaHtml/release"></a>
          <div class="table-row" data-filterable-current=":libraryProtocol2:dokkaHtml/release" data-filterable-set=":libraryProtocol2:dokkaHtml/release">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="scanner.html"><span><span>scanner</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="170916032%2FProperties%2F-2029165615"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":libraryProtocol2:dokkaHtml/release"><div class="symbol monospace"><span class="token keyword"></span><span class="token keyword">val </span><a href="scanner.html">scanner</a><span class="token operator">: </span><span data-unresolved-link="com.topstep.fitcloud.sdk.scanner/FcScanner///PointingToDeclaration/">FcScanner</span></div><div class="brief "><p class="paragraph">Get scanner for scan <code class="lang-kotlin">FitCloud</code> devices</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
      <div class="footer">
        <span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2023 Copyright</span><span
                class="pull-right"><span>Generated by </span><a
                href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span>
      </div>
    </div>
</div>
</body>
</html>
